<?php
/**
 * Copyright (C), 2021-2021, Shall Buy Life info. Co., Ltd.
 * FileName: EcConstant.php
 * Description: 说明
 *
 * @author lwl
 * @Create Date    2021/12/20 10:23
 * @Update Date    2021/12/20 10:23 By lwl
 * @version v1.0
 */

namespace Example\Constants;

interface EcConstant
{
    /**
     * FunctionName：toMemberBalance
     * Description：给用户增加余额
     * Author：lwl
     * @param string $topic
     * @param array $params
     * @return array
     */
    public static function toMemberBalance(string $topic, array $params): array;

    /**
     * FunctionName：toMemberRedEnvelope
     * Description：给批量用户批量增加余额
     * Author：lwl
     * @param string $topic
     * @param array $coinLogList
     * @param array $successIds
     * @param $model
     * @param int $status
     * @return array
     */
    public static function toMemberRedEnvelope(string $topic, array $coinLogList, array $successIds, $model, int $status = 0): array;


    /**
     * FunctionName：finishMasterOrder
     * Description：完成主订单状态
     * Author：lwl
     * @param string $topic
     * @param string $orderSn
     * @return array
     */
    public static function finishMasterOrder(string $topic, string $orderSn): array;


    /**
     * FunctionName：storeMasterOrder
     * Description：创建待支付主订单
     * Author：lwl
     * @param string $topic :主题
     * @param string $type :订单类型
     * @param $amount :金额
     * @param int $memberId :会员id
     * @param int $client :终端
     * @param $waitPayStatus :待支付状态
     * @return array
     */
    public static function storeMasterOrder(string $topic, string $type, $amount, int $memberId, int $client, $waitPayStatus): array;


    /**
     * FunctionName：cancelMasterOrder
     * Description：关闭订单
     * Author：lwl
     * @param string $topic
     * @param string $orderSn
     * @return array
     */
    public static function cancelMasterOrder(string $topic, string $orderSn): array;


    /**
     * FunctionName：settle
     * Description：手动结算
     * Author：lwl
     * @param string $topic
     * @param string $orderSn
     * @return array
     */
    public static function settle(string $topic, string $orderSn): array;

}
